<%-- 
    Document   : CadastrarCategorias
    Created on : 15/09/2008, 15:40:21
    Author     : 2006244090114
--%>
<%@page import="java.util.*,persistencia.*, modelo.*"contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CATEGORIAS</title>
    <style type="text/css">
        <!--
        .style1 {
            font-family: Times New Roman, Times, serif;
            background:black;
            
            
        }
        .style2 {
            
            position:absolute;
            top: 170px;
            left:8px;
            background:black;
            
        }
        
        .style3{
            
            height:300px;
            background:#999999;
            
        }
       .body{
               
background-repeat:repeat;
	}
                
        .texto {
            font-family:verdana,arial;
            text-decoration: none; 
            color:white;
            font-size: 12px
        }
        .texto:hover {
            font-family:verdana,arial;
            text-decoration: underline; 
            color: orange; 
            font-size: 10px
        }
        a.dcontexto{
                font-family:verdana,arial;
                text-decoration: none; 
                color:white;
                font-size: 12px;
                position:relative; 
                padding:0;
                border-bottom:2px dotted #039;
                cursor:help; 
                z-index:24;
  }
            a.dcontexto:hover{
                background:transparent;
                z-index:25; 
                font-family:verdana,arial;
                text-decoration: underline; 
                color: orange; 
                font-size: 10px
  }
  a.dcontexto span{display: none}
  a.dcontexto:hover span{ 
  display:block;
  position:absolute;
  width:230px; 
  top:3em;
  text-align:justify;
  left:0;
  font: 12px arial, verdana, helvetica, sans-serif; 
  padding:5px 10px;
  border:1px solid #999;
  background:#e0ffff; 
  color:#000;
  }
        -->
</style></head>
 <body  class="body" background="imagemDeFundo.jpg">
<center> <font size="3" face="arial" > <h1>Gasto Zero</h1></font></center><br/><br/><br/>
            
            <div class="style1" >
                
                <center>
                    <font ><a href="Menu.jsp" class="texto" >MENU</a></font>&nbsp;&nbsp;&nbsp;&nbsp;
               <font ><a href="Subcategorias.jsp" class="dcontexto" >SUBCATEGORIAS<span><strong>SUBCATEGORIA</strong>
Sub-categoria de Despesas </strong>.</span></a></font>&nbsp;&nbsp;&nbsp;&nbsp;
                    <font  class="texto"><a class="texto"  href="TelaReceitas.jsp">RECEITAS</a></font>&nbsp;&nbsp;&nbsp;&nbsp;
                    <font class="texto" ><a class="texto"  href="Despesas.jsp">DESPESAS</a></font>&nbsp;&nbsp;&nbsp;&nbsp;
                    <font class="texto" ><a class="texto"  href="ListarDespRec.jsp">ORCAMENTO TOTAL</a></font>&nbsp;&nbsp;&nbsp;&nbsp;
                    <font  class="texto"><a class="texto"  href="Grafico.jsp" class="texto">GERAR GR&Aacute;FICO</a> </font>&nbsp;&nbsp;&nbsp;&nbsp;
                    <font  class="texto"><a class="texto"  href="GerarRelatorio.jsp" class="texto"> GERAR RELAT&Oacute;RIO</a></font> &nbsp;&nbsp;&nbsp;&nbsp;               
                                    <font  class="texto"><a class="texto"  href="index.jsp">SAIR >></a></font>&nbsp;&nbsp;&nbsp;&nbsp;
                    
                    
                </center>
            </div>
            <div class="style3">
            <center>
                <h3>CONFIGURACAO DAS CATEGORIAS</h3>
            </center><br/>
                
                
                <center>   
                
              <%
                    CategoriaDAO categoriaDAO = new CategoriaDAO();
                    Vector categorias =  categoriaDAO.getCategorias();
                %>
        CATEGORIA: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="categoria">
   <%
            Iterator it = categorias.iterator();
            while (it.hasNext()) {
                
                Categoria cat = (Categoria) it.next();
                out.println("<option value="+  cat.getId_categoria() + ">"+cat.getNome_categoria()+"</option>" );
                
                
            }
        
        %>
        
<c:forEach var="categoria"  items="${categorias}">
<option>
 ${categoria}
</option>
</c:forEach>


</select>
           
         
 <input type="submit" value="Excluir" />&nbsp;<a href="ListarCategoria.jsp"><input type="submit" value="Listar para Alterar" /><a/><br/>
     
      <h4>Nova Categoria: </th><input type="text" name="Categoria" value="" />
      <input type="submit" value="Cadastrar" />
      <br/>
      </div>
      
</body>
</html>
